Skip to content

fix: secrets oauth skip getOwner#412

Closed
anirudhwarrier wants to merge 1 commit into
mainfrom
DEVSVCS-4808/fix-oauth-secrets-pvt-key
Closed

fix: secrets oauth skip getOwner#412
anirudhwarrier wants to merge 1 commit into
mainfrom
DEVSVCS-4808/fix-oauth-secrets-pvt-key

Conversation

@anirudhwarrier
Copy link
Copy Markdown
Collaborator

@anirudhwarrier anirudhwarrier commented May 4, 2026

DEVSVCS-4808

Refined logic for skipping owner retrieval:

  • Updated ShouldSkipGetOwner to check full command paths and handle additional cases: now skips for cre workflow hash, for cre workflow simulate when --broadcast is false or unset, and for any cre secrets ... command when --secrets-auth is set to browser.
  • Added new test cases to TestShouldSkipGetOwner for various cre secrets command scenarios, specifically covering the new logic for skipping when --secrets-auth is browser.

func ShouldSkipGetOwner(cmd *cobra.Command) bool {
switch cmd.Name() {
case "help":
path := cmd.CommandPath()
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cre help is listed under isLoadSettings’s exclusions in cmd/root.go, so that path does not call AttachSettings / loadWorkflowSettings at all. In practice ShouldSkipGetOwner never runs for normal cre help.

@anirudhwarrier anirudhwarrier requested a review from timothyF95 May 4, 2026 09:58
@anirudhwarrier anirudhwarrier marked this pull request as ready for review May 4, 2026 10:54
@anirudhwarrier anirudhwarrier requested a review from a team as a code owner May 4, 2026 10:54
@anirudhwarrier anirudhwarrier self-assigned this May 4, 2026
@anirudhwarrier anirudhwarrier deleted the DEVSVCS-4808/fix-oauth-secrets-pvt-key branch May 6, 2026 07:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant